import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  // mode: 'history',//去掉#号
  routes: [
    {
      path: "/", //这个表示的是根目录，即一进入的页面
      redirect: "/Refreash",
      component: resolve => require(["../page/Refreash.vue"], resolve)
    },
    {
      path: "/Home",
      name: "Home",
      component: resolve => require(["../page/Home.vue"], resolve),
      children: [
        {
          //首页
          path: "/Home/Index",
          name: "Index",
          component: resolve => require(["../page/Index.vue"], resolve)
        },
        {
          //楼书查看详情
          path: "/Home/BuildDetail",
          name: "BuildDetail",
          component: resolve => require(["../page/BuildDetail.vue"], resolve)
        },
        {
          //我的房源
          path: "/Home/Housing",
          name: "Housing",
          component: resolve => require(["../page/Housing.vue"], resolve)
        },
        {
          //我的楼书
          path: "/Home/Brochure",
          name: "Brochure",
          component: resolve => require(["../page/Brochure.vue"], resolve)
        },
        {
          //我的关注
          path: "/Home/Follow",
          name: "Follow",
          component: resolve => require(["../page/Follow.vue"], resolve)
        },
        {
          //个人信息与认证
          path: "/Home/Authentication",
          name: "Authentication",
          component: resolve => require(["../page/Authentication.vue"], resolve)
        },
        {
          //我的消息
          path: "/Home/New",
          name: "New",
          component: resolve => require(["../page/New.vue"], resolve)
        },
        {
          //开发商名录
          path: "/Home/Developers",
          name: "Developers",
          component: resolve => require(["../page/Developers.vue"], resolve)
        },
        {
          //户型图
          path: "/Home/Apartment",
          name: "Apartment",
          component: resolve => require(["../page/Apartment.vue"], resolve)
        },
        {
          //户型图
          path: "/Home/About",
          name: "About",
          component: resolve => require(["../page/About.vue"], resolve)
        }
      ]
    },
    {
      //分享
      path: "/Share",
      name: "Share",
      component: resolve => require(["../page/Share.vue"], resolve)
    },
    {
      //重定向
      path: "/Refreash",
      name: "Refreash",
      component: resolve => require(["../page/Refreash.vue"], resolve)
    },
    {
      //登录
      path: "/Login",
      name: "Login",
      component: resolve => require(["../page/login/login.vue"], resolve)
    },
    {
      //登录
      path: "/Loginmessage",
      name: "Loginmessage",
      component: resolve => require(["../page/login/loginmessage.vue"], resolve)
    },
    {
      //登录
      path: "/Loginphone",
      name: "Loginphone",
      component: resolve => require(["../page/login/loginphone.vue"], resolve)
    },
    {
      //登录
      path: "/Logintext",
      name: "Logintext",
      component: resolve => require(["../page/login/logintext.vue"], resolve)
    },
    {
      //登录
      path: "/Loginsuccess",
      name: "Loginsuccess",
      component: resolve => require(["../page/login/loginsuccess.vue"], resolve)
    },
    {
      //登录
      path: "/Loginforget",
      name: "Loginforget",
      component: resolve => require(["../page/login/loginforget.vue"], resolve)
    },
    {
      //登录
      path: "/Loginforgetcode",
      name: "Loginforgetcode",
      component: resolve =>
        require(["../page/login/loginforgetcode.vue"], resolve)
    },
    {
      //登录
      path: "/Loginmodifysuccess",
      name: "Loginmodifysuccess",
      component: resolve =>
        require(["../page/login/loginmodifysuccess.vue"], resolve)
    },
    {
      //登录
      path: "/Logincode",
      name: "Logincode",
      component: resolve => require(["../page/login/logincode.vue"], resolve)
    }
  ]
});
